package biopepa;

import java.util.*;

public class NewReaction {
	public String actionName;
	public  ArrayList speciesInvolved;
	public  HashMap<String , Node> nodesInvolved;
	public String expression;
	
	public NewReaction(String name){
		actionName = name;
		speciesInvolved = new ArrayList();
		nodesInvolved = new HashMap<String , Node>();
	}
	
	public NewReaction(String name, ArrayList<NewSpecies> speciesList1 , ArrayList<NewSpecies> speciesList2){
		actionName = name;
		speciesInvolved = new ArrayList<biopepa.NewSpecies>();
		nodesInvolved = new HashMap<String , Node>();
		int i,j;
		int speciesList1Size = speciesList1.size();
		int speciesList2Size = speciesList2.size();
		for(i=0; i<speciesList1Size; i++ ){
			speciesInvolved.add(speciesList1.get(i));
		}
		for(j=0; j<speciesList2Size; j++ ){
			speciesInvolved.add(speciesList2.get(j));
		}
	}
	
	public void addSpeciesInvolved(NewSpecies species){
		speciesInvolved.add(species);
	}
	
	public void addSpeciesInvolved(NewCompositionalDef compositionalDef){
		speciesInvolved.add(compositionalDef);
	}
	
	public void addNodesInvolved(Node node){
		nodesInvolved.put( node.getContent().nodeName , node);
	}

}
